package com.block.common.service;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 
 */
public class LogFactory {
     public static final String NOTIFY_LOG  = "notifylog";

     public static final String APPREQ="appreq";

     public static  final  String THRIDLOG ="thridlog";

    public  static  final String ERRORINFO ="errorinfo";

    public static final String MQ="mq";

    public static final String COMM_LOG="common";

    public static  final String CHAIN_LOG="chain";

    public static  final String PUSH_LOG="pushlog";

    public static  final String TIME_LOG="timelog";

    public static  final String SOURCE_LOG="sourcelog";
    public static  final String RISK_LOG="risklog";
    public static  final String UNION_LOG="unionlog";

    public  static Logger getErrorInfoLog()
    {
        return getLogByName(ERRORINFO);
    }

    /**
     * 队列消息日志
     * @return
     */
    public  static Logger getMqLog()
    {
        return getLogByName(MQ);
    }

    /**
     * 请求数据的log
     * @return
     */
    public static Logger getAppReq()
    {
        return getLogByName(APPREQ);
    }

    public  static Logger getNotifyLog(){
        return getLogByName(NOTIFY_LOG);
    }
    public  static Logger getThridLog(){
        return getLogByName(THRIDLOG);
    }

   public static Logger getCommLog(){
        return getLogByName(COMM_LOG);
   }

    public static Logger getAdminLog() {
        return getLogByName("adminlog");
    }
    public static Logger getPushLog() {
        return getLogByName(PUSH_LOG);
    }
    public static Logger getTimeLog() {
        return getLogByName(TIME_LOG);
    }
    public static Logger getSourceLog() {
        return getLogByName(SOURCE_LOG);
    }
    public static Logger getRiskLog() {
        return getLogByName(RISK_LOG);
    }
    public static Logger getUnionLog() {
        return getLogByName(UNION_LOG);
    }



    /**
     * 根据名称查询日志对象。
     * @param name
     * @return
     */
    public static Logger getLogByName(String name)
    {
      return   LoggerFactory.getLogger(name);
    }



    /**
     * 获取日志对象。
     * @param clazz
     * @return
     */
    public static Logger getLog(Class clazz)
    {
        return LoggerFactory.getLogger(clazz);
    }


}
